/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package java1;

import java.io.FileWriter;

/**
 *
 * @author sally
 */
import java.io.*;
public class IO3 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
	try(FileWriter fw=new FileWriter("data2.txt");
	PrintWriter pw =new PrintWriter ( fw ) ) {
	pw.println("中文字");
	pw.println("Hello  Yu  IO3");
		
     }catch(Exception e){
            e.printStackTrace();
        }
    
}
}